package com.ja10.books;
import android.app.Activity;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;


public class NetworkGet extends Activity {
    
	ConnectivityManager cm;
	NetworkInfo nInfo;
	
	boolean net;
	
	public NetworkGet(ConnectivityManager cm) {
		/* ConnectivityManagerの取得 */
		cm = (ConnectivityManager)cm;
		nInfo = cm.getActiveNetworkInfo();
		
        if (nInfo != null) {
            if (nInfo.isConnected()) {
                /* NetWork接続可 */
            	net = true;
     
            } else {
                /* NetWork接続不可 */
            	net = false;
            }
        } else {
        	net = false;
        }

	}
	
}
